package com.jnxx.task.mapper;

import com.jnxx.task.domain.Task;
import com.jnxx.basic.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author haha
 * @since 2023-08-22
 */
public interface TaskMapper extends BaseMapper<Task> {

    List<Task> getStaffTaskById(Task task);

    List<Task> findByCardId(Long cardId);

    void delByCardId(Long cardId);

    void delByModuleId(Long moduleId);

    List<Task> findByModuleId(Long moduleId);

    List<Task> findByKrId(Long id);

    void changeStates(Task task);

    void updateAnnexById(@Param("id") Long id, @Param("annex")String annex);

    void updatSureState(Long id);


    void successEvaluation(@Param("id") Long id,@Param("myStart") Long myStart,@Param("leaderStart") Long leaderStart);

    List<Task> findByNotReceiveTask();

    List<Task> findDailyTask(@Param("taskType")String taskType, @Param("now") LocalDateTime now);

    List<Task> findWeekTask(@Param("taskType")String taskType,@Param("lastWeekMon") LocalDateTime lastWeekMon, @Param("lastWeekFei")LocalDateTime lastWeekFei);

    Task selectTaskAndStaffList(Long id);

    List<Task> selectDelayTask(Task task);
}
